<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core"
                xmlns:constants="http://www.tuanzi.com/constants/tags"
                template="/templates/template.xhtml">
    <ui:define name="title">渠道配置信息</ui:define>
    <ui:define name="content">
        <h:form>
            <div class="topbar clearfix"
                 style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="right">

                        <p:button value="返回" icon="fa fa-reply-all" href="/views/family/unionlogin/channel-info-list.xhtml"></p:button>

                        <p:commandButton value="编辑" icon="fa fa-fw fa-edit" update="@form"
                                         rendered="#{loanUnionForeignChannelInfoBean.isView()}"
                                         actionListener="#{loanUnionForeignChannelInfoBean.changeStatusToEdit()}"/>

                        <p:commandButton value="保存" icon="fa fa-save" update="@form"
                                         rendered="#{loanUnionForeignChannelInfoBean.isEdit()}"
                                         actionListener="#{loanUnionForeignChannelInfoBean.saveInfo()}"/>
                    </f:facet>
                </p:toolbar>
            </div>
            <div class="ui-fluid" style="padding-top: 30px;">
                <div class="card ui-g-12">
                    <div class="ui-g">
                        <div class="ui-g-12"><h3><b>配置详情</b></h3></div>

                        <div class="ui-g-2">
                            <p:outputLabel value="渠道"/>
                        </div>
                        <div class="ui-g-4">
                            <p:selectOneMenu filter="true"
                                             filterMatchMode="contains"
                                             disabled="#{loanUnionForeignChannelInfoBean.isView()}"
                                             value="#{loanUnionForeignChannelInfoBean.$.channelId}">
                                <f:selectItem itemLabel="- 请选择 -" itemValue="" noSelectionOption="true"/>
                                <f:selectItems
                                        value="#{loanUnionForeignChannelInfoBean.getCommProductChannels()}"
                                        var="channelInfo"
                                        itemLabel="#{channelInfo.channelName}"
                                        itemValue="#{channelInfo.channelCode}"/>
                            </p:selectOneMenu>
                        </div>

                        <div class="ui-g-2">
                            <p:outputLabel value="安卓产品"/>
                        </div>
                        <div class="ui-g-4">
                            <p:selectOneMenu filter="true"
                                             filterMatchMode="contains"
                                             disabled="#{loanUnionForeignChannelInfoBean.isView()}"
                                             value="#{loanUnionForeignChannelInfoBean.$.productId}">
                                <f:selectItem itemLabel="- 请选择 -" itemValue="" noSelectionOption="true"/>
                                <f:selectItems
                                        value="#{loanUnionForeignChannelInfoBean.getCommProductIds()}"
                                        var="productInfo"
                                        itemLabel="#{productInfo.name}"
                                        itemValue="#{productInfo.productId}"/>
                            </p:selectOneMenu>
                        </div>

                        <div class="ui-g-2">
                            <p:outputLabel value="IOS产品"/>
                        </div>
                        <div class="ui-g-4">
                            <p:selectOneMenu filter="true"
                                             filterMatchMode="contains"
                                             disabled="#{loanUnionForeignChannelInfoBean.isView()}"
                                             value="#{loanUnionForeignChannelInfoBean.$.iosProductId}">
                                <f:selectItem itemLabel="- 请选择 -" itemValue="" noSelectionOption="true"/>
                                <f:selectItems
                                        value="#{loanUnionForeignChannelInfoBean.getCommProductIds()}"
                                        var="productInfo"
                                        itemLabel="#{productInfo.name}"
                                        itemValue="#{productInfo.productId}"/>
                            </p:selectOneMenu>
                        </div>

                        <div class="ui-g-2">
                            <p:outputLabel value="活动ID"/>
                        </div>
                        <div class="ui-g-4">
                            <p:inputText  disabled="#{loanUnionForeignChannelInfoBean.isView()}"
                                    value="#{loanUnionForeignChannelInfoBean.$.activityId}" />
                        </div>

                        <div class="ui-g-2">
                            <p:outputLabel value="安卓下载链接"/>
                        </div>
                        <div class="ui-g-4">
                            <p:inputText  disabled="#{loanUnionForeignChannelInfoBean.isView()}"
                                    value="#{loanUnionForeignChannelInfoBean.$.androidDownload}" />
                        </div>

                        <div class="ui-g-2">
                            <p:outputLabel value="IOS下载链接"/>
                        </div>
                        <div class="ui-g-4">
                            <p:inputText  disabled="#{loanUnionForeignChannelInfoBean.isView()}"
                                    value="#{loanUnionForeignChannelInfoBean.$.iosDownload}" />
                        </div>

                    </div>
                </div>
            </div>
        </h:form>
    </ui:define>
</ui:composition>
